<?php
use tpfcore\Core;
?>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<!-- Set render engine for 360 browser -->
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<!-- HTML5 shim for IE8 support of HTML5 elements -->
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js">
			</script>
		<![endif]-->
		<link href="{$admin_assets_path}/css/theme.min.css" rel="stylesheet">
		<link href="{$admin_assets_path}/css/simplebootadmin.css" rel="stylesheet">
		<link href="{$admin_assets_path}/css/default.css" rel="stylesheet" />
		<link href="{$admin_assets_path}/css/font-awesome.min.css" rel="stylesheet" type="text/css">
		<style>
			.length_3{width: 180px;} form .input-order{margin-bottom: 0px;padding:3px;width:40px;}
			.table-actions{margin-top: 5px; margin-bottom: 5px;padding:0px;} .table-list{margin-bottom:
			0px;}
		</style>
		<!--[if IE 7]>
			<link rel="stylesheet" href="{$admin_assets_path}/css/font-awesome-ie7.min.css">
		<![endif]-->
		<script type="text/javascript">
			//全局变量
			var GV = {
				WEB_ROOT:"",
				DIMAUB: "/",
				JS_ROOT: "/theme/backend/assets/js/",
				TOKEN: ""
			};
		</script>
		<!-- Le javascript==================================================-
		-> <!-- Placed at the end of the document so the pages load faster -->
		<script src="{$admin_assets_path}/js/jquery.js"></script>
		<script src="{$admin_assets_path}/js/wind.js"></script>
		<script src="{$admin_assets_path}/js/bootstrap.min.js"></script>
		<link href="{$admin_assets_path}/kindeditor/themes/default/default.css" rel="stylesheet"/>
		<script src="{$admin_assets_path}/kindeditor/kindeditor-min.js"></script>
		<script>
			var editor;
			KindEditor.ready(function(K) {
				var uploadbutton = K.uploadbutton({
					button : K('#uploadButton')[0],
					fieldName : 'imgFile',
					url : "{:url('cms/posts/upload')}",
					afterUpload : function(data) {
						if (data.code === 0) {
							var url = K.formatUrl(data.data[0], 'absolute');
							K('#url').val(url);
							$('#show_thumb').attr('src',url).show();
						} else {
							alert(data.msg);
						}
					},
					afterError : function(str) {
						alert('错误信息已打印到控制台');
						console.log(str);
					}
					});
					uploadbutton.fileBox.change(function(e) {
					uploadbutton.submit();
				});
			});
		</script>
	</head>
	<body>
		<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#A" data-toggle="tab">基本信息设置</a></li>
		</ul>
		<form class="form-horizontal js-ajax-form" action="" method="post">
			<fieldset>
				<div class="tabbable">
					<div class="tab-content">
						<div class="tab-pane active" id="A">
							<fieldset>
								<div class="control-group">
									<label class="control-label">文章是否开启评论：</label>
									<div class="controls">
										<select name="configs[POSTS_COMMENT_ON]">
											<option value="1" {eq name=":config('config.POSTS_COMMENT_ON')" value="1"}selected{/eq}>开启</option>
											<option value="0" {eq name=":config('config.POSTS_COMMENT_ON')" value="0"}selected{/eq}>关闭</option>
										</select>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">文章默认来源</label>
									<div class="controls">
										<input type="text" name="configs[articel_default_source]" value="{:config('config.articel_default_source')}"> 
										添加网站时默认的文章来源
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">文章默认作者</label>
									<div class="controls">
										<input type="text" name="configs[articel_default_author]" value="{:config('config.articel_default_author')}"> 
										添加网站时默认的作者
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">图片集最多上传张数</label>
									<div class="controls">
										<input type="text" name="configs[posts_images_upload_limit]" value="{:config('config.posts_images_upload_limit')}"><span class="form-required">*</span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">视频集最多添加数</label>
									<div class="controls">
										<input type="text" name="configs[posts_video_upload_limit]" value="{:config('config.posts_video_upload_limit')}"><span class="form-required">*</span>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">文章评价审核方式：</label>
									<div class="controls">
										<select name="configs[POSTS_CHECK_WAY]">
											<option value="1" {eq name=":config('config.POSTS_CHECK_WAY')" value="1"}selected{/eq}>自动审核</option>
											<option value="0" {eq name=":config('config.POSTS_CHECK_WAY')" value="0"}selected{/eq}>人工审核</option>
										</select>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">文档HTML默认保存路径</label>
									<div class="controls">
										<input type="text" name="configs[html_save_path]" value="{:config('config.html_save_path')}"> 
										相对于网站根目录
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">文章回收站功能：</label>
									<div class="controls">
										<select name="configs[POSTS_RECYCLE_ON]">
											<option value="1" {eq name=":config('config.POSTS_RECYCLE_ON')" value="1"}selected{/eq}>开启</option>
											<option value="0" {eq name=":config('config.POSTS_RECYCLE_ON')" value="0"}selected{/eq}>关闭</option>
										</select>
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">提取内容多长字符作为摘要</label>
									<div class="controls">
										<input type="text" name="configs[cut_posts_length]" value="{:config('config.cut_posts_length')}">
									</div>
								</div>
								<div class="control-group">
									<label class="control-label">文档内容同一关键词替换次数</label>
									<div class="controls">
										<input type="text" name="configs[keyword_replace_num]" value="{:config('config.keyword_replace_num')}"> 0表示全部替换
									</div>
								</div>
							</fieldset>
						</div>
					</div>
				</div>

				<div class="form-actions">
					<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
				</div>
			</fieldset>
		</form>
	<script src="{$admin_assets_path}/js/common.js"></script>
	</body>

</html>